<?php

namespace Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Food>
 */
class FoodFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'name' => fake()->words(3, true),
            'like_ratio_des' => fake()->randomFloat(1, 3, 5),
            'month_saled' => fake()->numberBetween(50, 1000),
            'unit' => '份',
            'food_tag_list' => json_encode(fake()->randomElements(['招牌', '辣', '新品', '推荐'], 2)),
            'price' => fake()->randomFloat(2, 10, 100),
            'picture' => 'foods/'.fake()->uuid().'.jpg',
            'description' => fake()->sentence(20),
            'tag' => fake()->randomElement(['主食', '小吃', '饮品'])
        ];
    }
}
